/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package crm.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 *
 * @author abet
 */
@Entity
@Table (name="crm_contact_person")
public class ContactPerson {
    @Id
    @Column(name="contact_person_id", length=10, nullable=false)
    private String cpId;
    @Column(name="contact_person_name", length=255, nullable=false,unique=true)
    private String cpName;
    @Column(name="contact_person_phone", length=255, nullable=false,unique=true)
    private String cpPhone;
    @Column(name="contact_person_email", length=255, nullable=false)
    private String cpEmail;
    @Column(name="contact_person_position", length=255, nullable=false)
    private String cpPosition;
    @ManyToOne
    @JoinColumn(name="client_id")
    private Client client;
    
    public String getCpPosition() {
        return cpPosition;
    }

    public void setCpPosition(String cpPosition) {
        this.cpPosition = cpPosition;
    }
    
    public Client getClient() {
        return client;
    }

    public void setClient(Client client) {
        this.client = client;
    }

    public String getCpEmail() {
        return cpEmail;
    }

    public void setCpEmail(String cpEmail) {
        this.cpEmail = cpEmail;
    }

    public String getCpId() {
        return cpId;
    }

    public void setCpId(String cpId) {
        this.cpId = cpId;
    }

    public String getCpName() {
        return cpName;
    }

    public void setCpName(String cpName) {
        this.cpName = cpName;
    }

    public String getCpPhone() {
        return cpPhone;
    }

    public void setCpPhone(String cpPhone) {
        this.cpPhone = cpPhone;
    }
}
